import numpy as np
np_array = np.array([[8,3,4,-2],[11, 4, 6,7],[2, 5,8,3]])
np_array.sort() # 默认按照行排序
print(np_array)
print('-'*35)

np_array = np.array([[8,3,4,-2],[11, 4, 6,7],[2, 5,8,3]])
np_array.sort(axis=0) # 按列进行排序
print(np_array)